Skip to content

fix model printing #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2023
Merged

fix model printing #53

merged 1 commit into from
Jul 24, 2023

Conversation

GiggleLiu
Copy link
Member

I notice that there are some printing issue is the current documentation. Which will be fixed by this PR. I also removed the nclique field of the UAIModel type, which is not used anywhere in the code.

Before the fix

The variables are not shown
image

After the fix

julia> using TensorInference

julia> model = read_model_file(pkgdir(TensorInference, "examples", "asia", "asia.uai"))
UAIModel(nvars = 8, nfactors = 8
 cards : [2, 2, 2, 2, 2, 2, 2, 2]
 factors : 
  Factor(1), size = (2,)
  Factor(1, 2), size = (2, 2)
  Factor(3), size = (2,)
  Factor(3, 4), size = (2, 2)
  Factor(3, 5), size = (2, 2)
  Factor(2, 4, 6), size = (2, 2, 2)
  Factor(6, 7), size = (2, 2)
  Factor(5, 6, 8), size = (2, 2, 2)

@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Merging #53 (1e4bacf) into main (79797ea) will increase coverage by 0.51%.
The diff coverage is 82.22%.

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   81.07%   81.59%   +0.51%     
==========================================
  Files           9        9              
  Lines         502      489      -13     
==========================================
- Hits          407      399       -8     
+ Misses         95       90       -5     
Impacted Files Coverage Δ
src/TensorInference.jl 100.00% <ø> (+25.00%) ⬆️
src/Core.jl 46.29% <22.22%> (-7.23%) ⬇️
src/mmap.jl 71.18% <86.66%> (ø)
src/map.jl 100.00% <100.00%> (ø)
src/mar.jl 94.64% <100.00%> (ø)
src/sampling.jl 98.75% <100.00%> (ø)
src/utils.jl 89.68% <100.00%> (+0.42%) ⬆️

@GiggleLiu GiggleLiu merged commit 2615430 into main Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant